package com.zhang.controller;

import com.zhang.async.EmailService;
import com.zhang.entity.response.ResponseResult;
import com.zhang.entity.vo.SendEmailBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * User: 张
 * Date: 2024-11-16
 * Time: 19:08
 * Description:
 */
@RestController
public class EmailController {
    @Autowired
    private EmailService emailService;
    @PostMapping("/sendEmail")
    public ResponseResult<Object> sentEmail(@RequestBody SendEmailBody sendEmailBody){
        emailService.sendEmail(sendEmailBody);
        return ResponseResult.success();
    }
}
